package uia.alumni.pms;

import java.io.PrintWriter;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.PersistenceUnit;
import javax.servlet.http.HttpServletRequest;
//import oracle.net.aso.r;
import uia.alumni.data.User;
import uia.alumni.profile.Constants;
import uia.alumni.web.Page;



/**
 * Page for viewing your inbox for private messages.
 * @author Lars-Erik
 */
public class Pms extends Page implements Constants {

    /** SERVLET_NAME is used for consistency checking of web.xml */
    public static final String SERVLET_NAME = "pms.pms";

    @PersistenceUnit(name=PERSISTENCE_UNIT)
    private EntityManagerFactory emf;


  public Pms() {
        super(null);
    }


    /**
     * View personal messages
     * @param out
     * @param request
     */
    public void writeBody(PrintWriter out, HttpServletRequest request) {
        EntityManager em = emf.createEntityManager();
        User user = getLoggedInUser(em, request);

            out.println("<h1>Personal messages</h1>");
            out.println("<tr><th><b>Title</b></th> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
            out.println("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
            out.println("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<th><b>Sender</b></th></tr><br>");
            out.println("<tr><td>MessageTitle </td><td>&nbsp;Sender</td></tr>");

        
        
            out.println("<br><br>");
            out.println(" <a href=\"pms.writepms.do\">Skriv melding</a><br>");
            out.println(" <a href=\"minside.html\">Min side</a>");


        
    }

    public final static long serialVersionUID = 1;

}
